#include <QtCore/QCoreApplication>

#include "ThreadSessaoTest.h"
#include <QString>
#include <QDebug>

int main(int argc, char *argv[])
{
	QCoreApplication *a = new QCoreApplication(argc, argv);
	const short int porta = 8763;
	const QString host = "127.0.0.1";

	controller::ThreadSessaoTest *teste1 = new controller::ThreadSessaoTest( host, porta,
		NULL, controller::fecharArquivoAbertoSendoUsado );

	controller::ThreadSessaoTest *teste2 = new controller::ThreadSessaoTest( host, porta,
		teste1, controller::getArquivoExistenteEspera );

	a->connect( teste1, SIGNAL(terminated()), a, SLOT(quit()) );

	teste1->setSibling( teste2 );
	teste2->start();
	teste1->start();

	return a->exec();
}
